package com.victor.service;

import java.util.List;

import com.github.pagehelper.PageInfo;
import com.victor.entity.Express;
import com.victor.entity.JingqubusinessOrder;
import com.victor.entity.JingqubusinessOrderShop;

public interface OrderService {

	/**
	 * app端添加订单
	 * @param order
	 * @return
	 */
	public boolean addOrder(JingqubusinessOrder order);
	
	/**
	 * app端添加购买的商品列表
	 * @param jingqubusinessOrderShop
	 * @return
	 */
	public boolean addOrderShop(JingqubusinessOrderShop jingqubusinessOrderShop);
	/**
	 * 	根据传入订单的字段查询order列表
	 */
	public List<JingqubusinessOrder> selectOderList(JingqubusinessOrder order);
	
	/**
	 * 	根据search搜索
	 */
	public List<JingqubusinessOrder> selectOderListBySearch(String search);

	/**
	 * 	批量删除订单
	 */
	public boolean batchDelete(int[] ids);
	//批量删除订单收件人信息
	public boolean batchDeleteAddress(int[] ids);
	//批量删除订单快递信息
	public boolean batchDeleteExpress(int[] ids);
	//批量删除购买的商品
	public boolean batchDeleteShops(int[] ids);
	
	/**
	 * 	订单详情
	 * @param id
	 * @return
	 */
	public JingqubusinessOrder selectDeatil(Integer id);
	
	/**
	 * 	接单
	 * 	向快递信息中添加物流单号
	 * @return
	 */
	public boolean receivingOrder(Integer i,String state);
	//添加物流
	public boolean addExpress(Express express);
	/**
	 * 根据uid查询订单
	 * @param uid
	 * @return
	 */
	public PageInfo<JingqubusinessOrder> selAllByUid(String uid,String state, int page, int row);
	/**
	 * 根据订单id查询
	 * @param oid
	 * @return
	 */
	public JingqubusinessOrder selOrdersById(String oid);
	/**
	 * 修改订单状态
	 * @param order
	 * @return
	 */
	public boolean updateState(JingqubusinessOrder order);
}
